package com.langfeiyes.pattern.factory.method;

import java.util.ArrayList;

public class App {
    public static void main(String[] args) {
        //电脑工厂
        HWProductFactory factory = new HWComputerFactory();
        //创建出电脑
        HWProduct computer = factory.produce();
        computer.show();

        //手机工厂
        factory = new HWPhoneFactory();
        //创建出手机
        HWProduct phone = factory.produce();
        phone.show();

        //平板工厂
        factory = new HWTabletFactory();
        //创建出平板
        HWProduct tablet = factory.produce();
        tablet.show();

    }
}
